package com.mcgrady.oop;

import org.junit.Test;

/**
 * @author McGrady
 */
public class OverrideTest {
    static class Fu{
        public A methodA(){return new A();}
    }
    static class Zi extends Fu{
        @Override
        public B methodA(){return new B();}
    }

    /**
     * A大 B小
     */
    static class A{
    }
    static class B extends A{
    }

    @Test
    public void methodA(){
        System.out.println(new Zi().methodA());
    }
}
